/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author Wx
 */
@Entity
public class SalesOrder implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    @OneToOne(cascade = {CascadeType.PERSIST})
    private Job job;
    @OneToMany(cascade = {CascadeType.ALL})
    private List<TrackingItem> trackingItems;
    private String creditCheck;
    private String atpCheck;
    private Timestamp creationDate;
    private String status;
    private String remark;
    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the job
     */
    public Job getJob() {
        return job;
    }

    /**
     * @param job the job to set
     */
    public void setJob(Job job) {
        this.job = job;
    }

    /**
     * @return the trackingItems
     */
    public List<TrackingItem> getTrackingItems() {
        return trackingItems;
    }

    /**
     * @param trackingItems the trackingItems to set
     */
    public void setTrackingItems(List<TrackingItem> trackingItems) {
        this.trackingItems = trackingItems;
    }

    /**
     * @return the creditCheck
     */
    public String getCreditCheck() {
        return creditCheck;
    }

    /**
     * @param creditCheck the creditCheck to set
     */
    public void setCreditCheck(String creditCheck) {
        this.creditCheck = creditCheck;
    }

    /**
     * @return the atpCheck
     */
    public String getAtpCheck() {
        return atpCheck;
    }

    /**
     * @param atpCheck the atpCheck to set
     */
    public void setAtpCheck(String atpCheck) {
        this.atpCheck = atpCheck;
    }

    /**
     * @return the date
     */
    public Timestamp getCreationDate() {
        return creationDate;
    }

    /**
     * @param date the date to set
     */
    public void setCreationDate(Timestamp creationDate) {
        this.creationDate = creationDate;
    }

    /**
     * @return the status
     */
    public String getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * @return the remark
     */
    public String getRemark() {
        return remark;
    }

    /**
     * @param remark the remark to set
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
